# -*- coding: utf-8 -*-
from __future__ import unicode_literals

__author__ = 'zhengkc'

from django.contrib import admin
from models import Product, Api, ApiArgs, ApiResponses, ApiResponsesCodes


class ApiListAdmin(admin.ModelAdmin):
    list_display = ('id', 'name', 'uri', 'description')


admin.site.register(Api, ApiListAdmin)


class ApiArgsAdmin(admin.ModelAdmin):
    list_display = ('api', 'args_name', 'args_data_type', 'check_type', 'check_value', 'description')


admin.site.register(ApiArgs, ApiArgsAdmin)


class ApiResponsesAdmin(admin.ModelAdmin):
    list_display = ('id', 'api', 'field', 'type', 'description')


admin.site.register(ApiResponses, ApiResponsesAdmin)


class ApiResponsesCodesAdmin(admin.ModelAdmin):
    list_display = ('id', 'api', 'code', 'description')


admin.site.register(ApiResponsesCodes, ApiResponsesCodesAdmin)
